package fileAndIO;

import org.junit.Test;

import java.io.FileNotFoundException;
import java.io.PrintStream;

public class Test8 {
    @Test
    public void test1() throws FileNotFoundException {
        // 打印流
        System.out.println(97);
        PrintStream ps = new PrintStream("ps.txt");

        System.setOut(ps);// 设置系统打印流向，输出到ps.txt

        System.out.println(97);
    }
}
